<!DOCTYPE html>
<html lang="zh-CN-Hans">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="keywords" content="">
    <meta name="description" content="">
    <title>个人信息</title>
    <link rel="stylesheet" type="text/css" href="/layui/css/layui.css">
    <link rel="stylesheet" type="text/css" href="/layui/common.css">
    <script type="text/javascript" src="/static/Easyui/jquery.min.js"></script>
    <link href="/ueditor/themes/default/css/umeditor.css" type="text/css" rel="stylesheet">
    <script type="text/javascript" src="/ueditor/umeditor.min.js"></script>
    <script type="text/javascript" src="/ueditor/third-party/template.min.js"></script>
    <script type="text/javascript" src="/ueditor/umeditor.config.js"></script>
    <script type="text/javascript" src="/static/Js/qiniu.min.js"></script>
    <script type="text/javascript" src="/static/Js/tools.js"></script>
    <style type="text/css">
        @keyframes animate_dots {
            0% {
                opacity: 1
            }
            to {
                opacity: 0
            }
        }

        @-webkit-keyframes animate_dots {
            0% {
                opacity: 1
            }
            to {
                opacity: 0
            }
        }

        .dot0, .dot1 {
            animation: animate_dots .9s infinite;
            -moz-animation: animate_dots .9s infinite;
            -webkit-animation: animate_dots .9s infinite;
            -o-animation: animate_dots .9s infinite
        }

        .dot1 {
            animation-delay: .2s;
            -webkit-animation-delay: .2s
        }

        .dot2 {
            animation: animate_dots .9s infinite;
            -moz-animation: animate_dots .9s infinite;
            -webkit-animation: animate_dots .9s infinite;
            -o-animation: animate_dots .9s infinite;
            animation-delay: .4s;
            -webkit-animation-delay: .4s
        }

        .dots_item {
            display: inline-block;
            margin-right: 5px;
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background: #4886ff
        }

        .verify-icon {
            position: absolute;
            width: 100%;
            margin-top: 70px;
            text-align: center
        }

        .t-mask {
            width: 100%;
            height: 100%;
            position: fixed;
            _position: absolute;
            left: 0;
            top: 0;
            background: #000;
            opacity: .5;
            filter: progid:DXImageTransform.Microsoft.Alpha(opacity=50);
            z-index: 2000000000
        }
    </style>
    <style>
        .rheader .rlogo a, .step_list li em, .zcys_con dl dt, .reg_ok dl dt {
            background: url(/imgs/regico.png) no-repeat;
        }

        em {
            font-style: normal;
        }

        .register_steps {
            padding-top: 50px;
        }

        .reg_steps_b {
            position: relative;
            height: 60px;
            width: 990px;
            margin: 50px auto;
            overflow: hidden;
        }

        .step_list {
            position: absolute;
            Z-index: 9;
            width: 840px;
            top: 0px;
            left: 75px;
        }

        .step_list li {
            float: left;
            width: 170px;
            margin-left: 40px;
            _display: inline;
        }

        .step_list li em {
            display: block;
            height: 22px;
            width: 22px;
            line-height: 22px;
            background-position: 0 -33px;
            margin: 0 auto;
            text-align: center;
            color: #fff;
        }

        .step_list li p {
            line-height: 40px;
            color: #919191;
            text-align: center;
            font-size: 14px;
        }

        .step_list li.current em {
            background-position: 0 -11px;
            width: 170px;
        }

        .step_list li.current p {
            color: #fe7342;
        }

        .reg_steps_b i {
            display: block;
            width: 100%;
            height: 2px;
            background: #e4e4e4;
            position: absolute;
            left: 0px;
            top: 10px;
            z-index: 1;
            overflow: hidden;
        }

        .spw-cont .spw-tit {
            padding: 0 40px;
            height: 50px;
            line-height: 50px;
            border-bottom: 1px solid #f2f2f2;
        }

        .spw-cont .spw-tit h1 {
            font-size: 18px;
            color: #555;
            font-weight: bold;
        }

        .spw-cont .spw-mian {
            width: 420px;
            margin: 50px auto 0;
            position: relative;
        }

        .spw-cont .spw-mian .spw-icon {
            width: 80px;
            height: 80px;
            display: block;
            position: absolute;
            left: 0;
            top: 0;
            background: url(/static/images/pprompt-icon.png) no-repeat;
        }

        .spw-cont .spw-mian .spw-info {
            padding-left: 100px;
        }

        .spw-cont .spw-mian .spw-info h2 {
            font-size: 24px;
            font-weight: bold;
        }

        .spw-cont .spw-mian .spw-info .spw-txt {
            font-size: 14px;
            color: #8c8c8c;
            overflow: hidden;
        }

        .spw-cont .spw-mian .spw-info .spw-txt p {
            margin: 12px 0 8px;
        }

        .spw-cont .spw-mian .spw-info .spw-txt span {
            display: block;
            line-height: 24px;
        }

        .spw-cont .spw-mian .spw-info .spw-txt em {
            color: #333;
        }

        .spw-cont .spw-mian .spw-info .spw-txt .tag {
            border: 1px solid #d2d2d2;
            background-color: #f5f9fc;
            height: 23px;
            padding: 0 5px;
            color: #555;
            display: block;
            float: left;
            margin: 0 7px 5px 0;
        }

        .spw-cont .spw-mian .spw-info .spw-btn {
            margin-top: 12px;
        }

        .spw-cont .spw-mian .spw-info .spw-btn .btn {
            width: 138px;
            height: 38px;
            padding: 0;
            text-align: center;
            line-height: 38px;
            font-size: 14px;
        }

        .spw-cont .spw-success .spw-icon {
            background-position: 0 0;
        }

        .spw-cont .spw-success h2 {
            color: #4bc696;
        }

        .spw-cont .spw-fail .spw-icon {
            background-position: -85px 0;
        }

        .spw-cont .spw-fail h2 {
            color: #24be00;
        }

        .spw-cont .spw-wait .spw-icon {
            background-position: -169px 0;
        }

        .spw-cont .spw-wait h2 {
            color: #ff8f23;
        }
        .divTags li {
            float: left;
            padding: 12px 0 15px
        }

        .divTags li {
            font-size: 12px;
            color: #fff;
            background-color: #428BCA;
            display: inline-block;
            margin: 0 5px 5px 0;
            padding: 2px 6px;
            line-height: 20px;
            font-weight: 400
        }

        .divTags li:nth-child(9n) {
            background-color: #4A4A4A
        }

        .divTags li:nth-child(9n+1) {
            background-color: #428BCA
        }

        .divTags li:nth-child(9n+2) {
            background-color: #5CB85C
        }

        .divTags li:nth-child(9n+3) {
            background-color: #D9534F
        }

        .divTags li:nth-child(9n+4) {
            background-color: #567E95
        }

        .divTags li:nth-child(9n+5) {
            background-color: #B433FF
        }

        .divTags li:nth-child(9n+6) {
            background-color: #00ABA9
        }

        .divTags li:nth-child(9n+7) {
            background-color: #B37333
        }

        .divTags li:nth-child(9n+8) {
            background-color: #F60
        }

        .divTags li:hover {
            opacity: .8;
            filter: alpha(opacity=80);
            color: #fff !important
        }

        .divTags li a {
            color: #FFF
        }
        .widget {
            background-color: #fff;
            border: 1px solid #eee;
            overflow: hidden;
            padding: 15px 20px 10px 20px;
            margin-bottom: 20px
        }

        .widget-tie h3 {
            padding-bottom: 10px;
            margin-bottom: 21px;
            border-bottom: 1px solid #ebebeb;
            font-size: 15px;
            position: relative
        }

        .widget-tie h3:after {
            content: "";
            width: 70px;
            height: 1px;
            background: #e94c3d;
            position: absolute;
            left: 0;
            bottom: -1px
        }

        .widget ul {
            margin: 0;
            list-style: none
        }
    </style>
</head>
<body class="main">

<{include file="public/header.html"}>

<div id="main" class="layui-main">
    <div class="layout-main clearfix">

        <{include file="public/sidebar.html"}>

        <div class="my-content">
            <div class="wrap">
                <div class="layui-tab layui-tab-brief" lay-filter="coinfo">
                    <ul class="layui-tab-title">
                        <li lay-id="coinfo" class="layui-this">企业信息</li>
                        <li lay-id="desc" >公司简介</li>
                        <li lay-id="contact" >联系人信息</li>
                        <li lay-id="ext" >扩展信息</li>
                    </ul>
                    <div class="layui-tab-content">
                        <div class="layui-tab-item layui-show">
                            <ul>
                                <li class="clearfix">
                                    <div class="layui-form-item">
                                        <label class="layui-form-label"><i class="red">*</i>公司名称</label>
                                        <div class="layui-input-block">
                                            <input class="layui-input" type="text" readonly v-model="params.name" lay-verify="required" placeholder="最长64个字符" style="width: 400px;">
                                            <div class="input-tip" style=" color: #ccc; line-height: 40px;">
                                                请填写营业执照上公司名称，个体经营请标明“个体经营”
                                                <a onmouseover="showyyzz();" onmouseout="closeyyzz();" style="display: none;">
                                                    查看图例
                                                    <div class="imgtip" style="width:360px; height:250px;" id="yyzz"><i></i><img src="/imgs/imgtip-yyzz.jpg"></div>
                                                </a>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="layui-form-item">
                                        <label class="layui-form-label"><i class="red">*</i>所属行业</label>
                                        <div class="layui-input-block">
                                            <select v-model="params.catalog_id" class="selet" data-val-required="请选择所属行业" id="OwnedIndustry" name="OwnedIndustry">
                                                <option>请选择所属行业</option>
                                                <option disabled>-----------</option>
                                                <option v-for="(vo,index) in catalog" :value="index" :selected="index==params.catalog_id">
                                                    {{vo}}
                                                </option>
                                            </select>
                                        </div>
                                    </div>
                                    <div class="layui-form-item">
                                        <label class="layui-form-label"><i class="red">*</i>所属地区</label>
                                        <div class="layui-input-block">
                                            <select v-model="params.province_id" class="selet" name="Province" id="Province" @change="getcity">
                                                <option>请选择省</option>
                                                <option disabled>-----------</option>
                                                <option v-for="(vo,index) in province" :value="index" :selected="index==params.province_id">
                                                    {{vo}}
                                                </option>
                                            </select>
                                            <select v-model="params.city_id" class="selet" name="City" id="City" @change="getdistrict">
                                                <option>请选择市</option>
                                                <option disabled>-----------</option>
                                                <option v-for="(vo,index) in city" :value="index" :selected="index==params.city_id">
                                                    {{vo}}
                                                </option>
                                            </select>
                                            <select v-model="params.district_id" class="selet" name="District" id="District" style="display: none;">
                                                <option>请选择县/区</option>
                                                <option disabled>-----------</option>
                                                <option v-for="(vo,index) in district" :value="index" :selected="index==params.district_id">
                                                    {{vo}}
                                                </option>
                                            </select>
                                        </div>
                                    </div>
                                    <div class="layui-form-item">
                                        <label class="layui-form-label"><i class="red">*</i>主营产品</label>
                                        <div class="layui-input-block">
                                            <input class="layui-input" type="text" v-model="params.main_products" lay-verify="required" placeholder="最长64个字符" style="width: 400px;">
                                            <div class="input-tip" style=" color: #ccc; line-height: 40px;">
                                                <a href="http://www.ailaba.org/Help/Answer/26" target="_blank">如何填写主营产品?</a>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="layui-form-item">
                                        <label class="layui-form-label">企业官网</label>
                                        <div class="layui-input-block">
                                            <input class="layui-input" v-model="params.info.website" data-val-length-max="100" data-val-url="网址格式错误!" id="EnterpriseNetUrl" name="EnterpriseNetUrl" placeholder="例如：http://www.curr.cn" type="text" style="width: 400px;">
                                        </div>
                                    </div>
                                    <div class="layui-form-item">
                                        <label class="layui-form-label">企业LOGO</label>
                                        <div class="layui-input-block">
                                            <div class="layui-upload">
                                                <button type="button" class="layui-btn" id="cologo">上传图片</button>
                                                <div class="layui-upload-list" style="display: flex">
                                                    <div style="flex: 2"><img class="layui-upload-img" style="width: 200px;" id="demo1" :src="params.logo"></div>
                                                    <div style="flex: 3;align-self: flex-end;">
                                                        <a href="javascript:void(0)" @click="rmlogo" id="delCorporateLogobtn" class="btn bgray">删除</a>
                                                        <div class="scpic-tip">提示：请上传160*160（宽x高）,并小于1M的图片</div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="layui-form-item">
                                        <label class="layui-form-label"><i class="red"></i>标签</label>
                                        <div class="layui-input-block">
                                            <div class="widget widget-tie divTags" style="padding-left:0;border:none;padding-top: 0;">
                                                <ul>
                                                    <li v-for="(vo,index) in params.label_list" @click="params.label_list.splice(index, 1)">
                                                        <a href="javascript:void(0);" :title="vo">{{vo}}</a>
                                                    </li>
                                                </ul>
                                            </div>
                                            <input class="layui-input" v-model="labelValue" type="text" lay-verify="required" placeholder="请输入标签值" style="width: 300px; display: inline-block;">
                                            <input type="button" @click="addLabel" value="添加" style="display: inline-block; width: 60px; height: 29px;" />
                                        </div>
                                    </div>
                                    <hr style="margin: 50px 0;">
                                    <div class="layui-input-block">
                                        <button class="borange" @click="layui.element.tabChange('coinfo', 'desc')">下一步</button>
                                    </div>
                                </li>
                            </ul>
                        </div>
                        <div class="layui-tab-item">
                            <ul>
                                <li class="clearfix">
                                    <div class="layui-form-item">
                                        <div class="ke-container ke-container-default">
                                            <script id="coinfoEditor" name="introduct" type="text/plain" style="min-height: 400px;"></script>
                                            <div class="input-tip" style="color: #aaa; font-size: 13px;line-height: 28px;">请用中文详细说明贵司的成立历史、主营产品、品牌、服务等优势， 请勿在公司简介里输入任何的联系方式，如电话、QQ号、微信号等，否则有可能无法通过审核。</div>
                                        </div>
                                    </div>
                                    <hr style="margin: 50px 0;">
                                    <div class="layui-input-block">
                                        <button class="borange" @click="layui.element.tabChange('coinfo', 'contact')">下一步</button>
                                    </div>
                                </li>
                            </ul>
                        </div>
                        <div class="layui-tab-item">
                            <ul>
                                <li class="clearfix">
                                    <div class="layui-form-item">
                                        <label class="layui-form-label"><i class="red">*</i>账号</label>
                                        <div class="layui-input-block">
                                            <input class="layui-input" type="text" disabled v-model="params.members.phone" lay-verify="required" placeholder="手机号码" style="width: 200px;border: none;">
                                        </div>
                                    </div>
                                </li>
                                <li class="clearfix">
                                    <div class="layui-form-item">
                                        <label class="layui-form-label"><i class="red">*</i>联系人</label>
                                        <div class="layui-input-block">
                                            <input class="layui-input" type="text" v-model="params.members_info.contact" lay-verify="required" placeholder="联系人" style="width: 200px;">
                                        </div>
                                    </div>
                                </li>
                                <li class="clearfix">
                                    <div class="layui-form-item">
                                        <label class="layui-form-label"><i class="red">*</i>联系电话</label>
                                        <div class="layui-input-block">
                                            <input class="layui-input" type="text" v-model="params.members_info.tel" lay-verify="required" placeholder="联系电话" style="width: 200px;">
                                        </div>
                                    </div>
                                </li>
                                <li class="clearfix">
                                    <div class="layui-form-item">
                                        <label class="layui-form-label"><i class="red">*</i>QQ号码</label>
                                        <div class="layui-input-block">
                                            <input class="layui-input" type="text" v-model="params.members_info.qq" lay-verify="required" placeholder="QQ号码" style="width: 200px;">
                                        </div>
                                    </div>
                                </li>
                                <li class="clearfix">
                                    <div class="layui-form-item">
                                        <label class="layui-form-label"><i class="red">*</i>电子邮箱</label>
                                        <div class="layui-input-block">
                                            <input class="layui-input" type="text" v-model="params.members_info.email" lay-verify="required" placeholder="电子邮箱" style="width: 200px;">
                                        </div>
                                    </div>
                                </li>
                                <li class="clearfix" style="display: none;">
                                    <div class="layui-form-item">
                                        <label class="layui-form-label">邮编</label>
                                        <div class="layui-input-block">
                                            <input class="layui-input" type="text"  v-model="params.members_info.postcode"  lay-verify="required" placeholder="邮编" style="width: 200px;">
                                        </div>
                                    </div>
                                </li>
                                <li class="clearfix">
                                    <div class="layui-form-item">
                                        <label class="layui-form-label">地址</label>
                                        <div class="layui-input-block">
                                            <input class="layui-input" type="text"  v-model="params.address"  lay-verify="required" placeholder="地址" style="width: 400px;">
                                        </div>
                                    </div>
                                </li>
                            </ul>
                            <hr style="margin: 50px 0;">
                            <div class="layui-input-block">
                                <button class="borange" @click="layui.element.tabChange('coinfo', 'ext')">下一步</button>
                            </div>
                        </div>
                        <div class="layui-tab-item">
                            <ul>
                                <li class="clearfix">
                                    <div class="layui-form-item">
                                        <label class="layui-form-label"><i class="red">*</i>公司全称</label>
                                        <div class="layui-input-block">
                                            <input class="layui-input" type="text"  v-model="params.info.full_name"  lay-verify="required" placeholder="公司全称" style="width: 400px;">
                                        </div>
                                    </div>
                                    <div class="layui-form-item">
                                        <label class="layui-form-label"><i class="red">*</i>经营模式</label>
                                        <div class="layui-input-block">
                                            <select class="selet valid" data-val="true" v-model="params.info.operation_mode"><option>请选择经营模式</option>
                                                <option>生产加工</option>
                                                <option>经销批发</option>
                                                <option>招商代理</option>
                                                <option>商业服务</option>
                                                <option>其他</option>
                                            </select>
                                        </div>
                                    </div>
                                    <div class="layui-form-item">
                                        <label class="layui-form-label"><i class="red">*</i>企业类型</label>
                                        <div class="layui-input-block">
                                            <select class="selet valid" data-val="true"  v-model="params.info.business_type" ><option>请选择企业类型</option>
                                                <option>国企</option>
                                                <option>民营公司</option>
                                                <option>事业单位</option>
                                                <option>所有外资(欧美)</option>
                                                <option>外资(非欧美)</option>
                                                <option>合资(欧美)</option>
                                                <option>合资(非欧美)</option>
                                                <option>外企代表处</option>
                                                <option>其它性质</option>
                                            </select>
                                        </div>
                                    </div>
                                    <div class="layui-form-item">
                                        <label class="layui-form-label"><i class="red"></i>主营品牌</label>
                                        <div class="layui-input-block">
                                            <input class="layui-input" type="text" v-model="params.info.main_brands" lay-verify="required" placeholder="主营品牌" style="width: 400px;">
                                        </div>
                                    </div>
                                    <div class="layui-form-item">
                                        <label class="layui-form-label"><i class="red"></i>注册资金</label>
                                        <div class="layui-input-block">
                                            <input class="layui-input" type="text"  v-model="params.info.register_capital"  lay-verify="required" placeholder="注册资金" style="width: 400px;">
                                        </div>
                                    </div>
                                </li>
                            </ul>
                            <hr style="margin: 50px 0;">
                            <div class="layui-input-block">
                                <button class="borange" @click="submit">确认提交</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<{include file="public/footer.html"}>

<script>
    UM.getEditor('coinfoEditor');
    var indexVm = new Vue({
        el: '#main',
        data: {
            catalog: JSON.parse('<{json_encode($catalog)}>'),
            params: JSON.parse('<{addslashes(json_encode($dataset))}>'),
            province: JSON.parse('<{json_encode($province)}>'),
            city: JSON.parse('<{json_encode($city)}>'),
            district: JSON.parse('<{json_encode($district)}>'),
            domain: '<{$domain}>',
            labelValue: '',
        },
        methods: {
            init() {
                UM.getEditor('coinfoEditor').setContent(indexVm.params.info.description);
            },
            addLabel(){
                if(indexVm.labelValue) {
                    indexVm.params.label_list.push(indexVm.labelValue);
                    indexVm.labelValue = '';
                }
            },
            getcity(){
                indexVm.city = [];
                indexVm.district = [];
                ajax(GetCity_url, {up: indexVm.params.province_id}).then(function (data) {
                    indexVm.city = data.data;
                });
            },
            getdistrict(){
                indexVm.district = [];
                ajax(GetCity_url, {up: indexVm.params.city_id}).then(function (data) {
                    indexVm.district = data.data;
                });
            },
            rmlogo(){
                indexVm.$set(indexVm.params, "logo", '');
            },
            submit(){
                indexVm.params.label = indexVm.params.label_list.join(',');
                indexVm.params.introduce = UM.getEditor('coinfoEditor').getContentTxt();
                indexVm.params.info.description = UM.getEditor('coinfoEditor').getContent();
                if(indexVm.params.name==''){
                    layer.msg("公司名称不能为空");
                    layui.element.tabChange('coinfo', 'coinfo');
                    return false;
                }
                if(indexVm.params.catalog==''){
                    layer.msg("请选择所属行业");
                    layui.element.tabChange('coinfo', 'coinfo');
                    return false;
                }
                if(indexVm.params.city_id==0){
                    layer.msg("请选择所属地区");
                    layui.element.tabChange('coinfo', 'coinfo');
                    return false;
                }
                if(indexVm.params.main_products==''){
                    layer.msg("请填写主营产品");
                    layui.element.tabChange('coinfo', 'coinfo');
                    return false;
                }
                if(indexVm.params.introduce==''){
                    layer.msg("请填写公司简介");
                    layui.element.tabChange('coinfo', 'desc');
                    return false;
                }
                if(indexVm.params.members_info.contact==''){
                    layer.msg("请填写联系人");
                    layui.element.tabChange('coinfo', 'contact');
                    return false;
                }
                if(indexVm.params.members_info.tel==''){
                    layer.msg("请填写联系电话");
                    layui.element.tabChange('coinfo', 'contact');
                    return false;
                }
                if(indexVm.params.members_info.qq==''){
                    layer.msg("请填写联系QQ");
                    layui.element.tabChange('coinfo', 'contact');
                    return false;
                }
                if(indexVm.params.members_info.email==''){
                    layer.msg("请填写联系Email");
                    layui.element.tabChange('coinfo', 'contact');
                    return false;
                }
                if(indexVm.params.info.full_name==''){
                    layer.msg("请填写公司全称");
                    layui.element.tabChange('coinfo', 'ext');
                    return false;
                }
                if(indexVm.params.info.operation_mode==''){
                    layer.msg("请选择经营模式");
                    layui.element.tabChange('coinfo', 'ext');
                    return false;
                }
                if(indexVm.params.info.business_type==''){
                    layer.msg("请选择企业类型");
                    layui.element.tabChange('coinfo', 'ext');
                    return false;
                }
                ajax(Coinfo_url, indexVm.params, true, true).then((item)=>{
                    if(item.ret==0) {
                        $('.avatar .my-avatar').attr('src', indexVm.params.logo);
                    }
                });
            }
        }
    });
    setTimeout(()=>{
        indexVm.init();
    }, 500);
    qiniu_single('cologo', function (res) {
        indexVm.$set(indexVm.params, "logo", res);
    });
</script>
</body>
</html>
